package generic;

/**
 * @author ChangLiang
 * @date 2021/2/1
 */
public class BasicGeneratorDemo {
    public static void main(String[] args) {

        // 使用BasicGenerator，你可以很容易地为CountedObject创建一个Generator
        Generator<CountedObject> gen = BasicGenerator.create(CountedObject.class);

        for (int i = 0; i < 5; i++) {
            System.out.println(gen.next());
        }
    }
}
